package com.mjk.common.web.getway.restful.prototal.ws.soap.proxy;

import org.springframework.cglib.proxy.Enhancer;
import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class CglibProxy implements MethodInterceptor{
	private final Object target;
	
	public CglibProxy(Object target){
		this.target = target;
	}
	
	public Object newInstansProxy(){
		Enhancer enhancer = new Enhancer();
		
		enhancer.setSuperclass(this.target.getClass());
		enhancer.setCallback(this);
		return enhancer.create();
	}
	@Override
	public Object intercept(Object proxy, Method method, Object[] args,
			MethodProxy methodProxy) {
		
		return null;
	}

}
